<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>定时任务日志明细</title>
</head>
<style>
    *{font-size: 12px;}
    td img {width:80px; height:80px}
    table tr th {border-bottom: 1px solid #aaaaaa; background: #eeeeee; min-width: 85px;}
    table tr td {border-bottom: 1px solid #cccccc; min-width: 85px;}
</style>
<div th:include="/common/codemirror :: codemirrorStyle"></div>
<body th:with="nowDate=${#dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd')}">
<table>
    <thead>
        <tr>
            <th th:text="日志Id">logId</th>
            <th th:text="任务ID">jobId</th>
            <th th:text="任务名">jobName</th>
            <th th:text="glueType">glueType</th>
            <th th:text="beanName">beanName</th>
            <th th:text="类路径">className</th>
            <th th:text="方法">method</th>
            <th th:text="参数">params</th>
            <th th:text="cron表达式">cron</th>
            <th th:text="执行类型">execType</th>
            <th th:text="执行节点">host</th>
            <th th:text="执行时间">created</th>
            <th th:text="预警邮件">mailTmpCode</th>
        </tr>

    </thead>
    <tbody th:object="${baseJobLog}">
        <tr>
            <td th:text="*{logId}">logId</td>
            <td th:text="*{jobId}">jobId</td>
            <td th:text="*{jobName}">jobName</td>
            <td th:text="*{glueType}">glueType</td>
            <td th:text="*{beanName}">beanName</td>
            <td th:text="*{className}">className</td>
            <td th:text="*{method}">method</td>
            <td th:text="*{params}">params</td>
            <td th:text="*{cron}">cron</td>
            <td th:text="*{execType}">execType</td>
            <td th:text="*{host}">host</td>
            <td th:text="*{created}">created</td>
            <td th:text="*{mailTmpCode}">mailTmpCode</td>
        </tr>
        <tr>
            <td>
                <div>
                    <textarea th:type="text" name="glueCode" id="glueCode" th:text="*{glueCode}"/>
                </div>
            </td>
        </tr>
        <tr>
            <td th:if="${not #strings.isEmpty(baseJobLog.execMsg)}" th:text="*{execMsg}" style="background:black;color:#dddddd;padding: 20px 20px 50px 20px">execMsg</td>
        </tr>
    </tbody>
</table>
</body>
</html>
<script type="text/javascript" th:inline="javascript">
    /*<![CDATA[*/
    var glueCode = CodeMirror.fromTextArea(document.getElementById("glueCode"), {
            // mode: "xml",               //默认语言模式：xml代码高亮
            // mode: "text/x-sql",     //sql代码高亮
            mode: "text/x-java",
            indentWithTabs: true,
            smartIndent: true,
            lineNumbers: true,    //显示行号
            matchBrackets : true, //括号匹配
            autofocus: true,
            theme: "eclipse",	//设置主题
            lineWrapping: true,	//代码折叠
            extraKeys: {        // 自动补全
                "Ctrl-Space": "autocomplete"
            },
            autoCloseBrackets: true,
            foldGutter: true,
            gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
            readOnly:true
        });
        glueCode.setSize('auto','80em');   //设置编辑器高度
    /*]]>*/
</script>
